import { DemoBlock, DemoBoth } from 'demos';
import { Button, Drawer } from '@pxxtech/mobile';

const showDrawer = () => {
  Drawer.show({
    title: '标题',
    children: (
      <>
        <Drawer.Content>
          <div
            style={{
              height: '1000px',
              backgroundColor: 'rgba(209, 23, 255, 0.2)',
            }}
          >
            内容
          </div>
        </Drawer.Content>
        <Drawer.Footer>
          <Button block color="primary">
            确定
          </Button>
        </Drawer.Footer>
      </>
    ),
  });
};

export default () => {
  return (
    <DemoBoth
      mobileChildren={
        <DemoBlock title="normal">
          <Button onClick={() => showDrawer()}>normal 抽屉</Button>
        </DemoBlock>
      }
    />
  );
};
